import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue'),
    },
    {
      path: '/',
      name: 'home',
      component: () => import('../views/main.vue'),
      children:[
        {
          path: '/userManage',
          component:()=> import('../views/userManage.vue'),
        },
        {
          path: '/questionList',
          component:()=> import('../views/questionList.vue'),
        },
        {
          path: '/questionAdd',
          component:()=> import('../views/questionAdd.vue'),
        },
        {
          path: '/questionBatchUpload',
          component:()=> import('../views/questionBatchUpload.vue'),
        }
      ]
    },
  ],
})

export default router
